<div class="modal-header">
	<h4 class="modal-title">{{item.id?'编辑':'添加'}}颜色</h4>
</div>
<div class="modal-body container-fluid form-horizontal">
	<form name="form" novalidate>
		<div class="form-group" >
			<label class="col-xs-2 control-label required">名称：</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" ng-model="item.name" name="name" required
					   uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.id}}" ensure-unique="name" api="../instance/checkUniqueName_mute"
				/>
			</div>
		</div>
		<div class="form-group" >
			<label class="col-sm-2 control-label required">颜色:</label>
			<div class="col-sm-4">
				<input class="form-control" type="text" ng-model="item.color" ng-pattern="/^#[0123456789abcdef]{6}$/i" required />
			</div>
			<div class="col-sm-4"  >
				<div style="cursor: pointer;display:inline-block;height: 34px"  color-picker >
					<span  style="display:inline-block;height: 100%;width:80px;box-shadow:2px 4px 3px 2px rgba(0,0,0,.2);" ng-style="{'background-color': item.color}"></span>
					<span class="fa fa-edit"  style="font-size:32px;vertical-align: text-bottom" ></span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label required" >透明度：</label>
			<div class="col-sm-4">
				<input type="text" class="form-control" ng-model="item.transparent" ng-pattern="/^[0123456789abcdef]{2}$/i"  name="transparent"  required/>
			</div>
		</div>
	</form>
</div>
<div class="modal-footer">
	<button class="btn btn-primary" ng-click="save(form)">确定</button>
	<button class="btn btn-warning" ng-click="$dismiss()">取消</button>
</div>
